<?php
elgg_load_library('elgg:class_organization');

$org = get_entity(get_input('o'));
$user = get_input('u');

//Security check
if(!$org->isManager()) forward();

if($org->removeManager($user))
{
	system_message(elgg_echo('organizations:admins:deletion:success'));
}
else
{
	register_error(elgg_echo('organizations:admins:deletion:fail'));
}
forward(REFERER);
